package zhh.tangbao.wechat.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import zhh.tangbao.wechat.vo.WeChatUserCacheVo;

import java.util.Date;

/**
 * 2023/2/26
 * @author 粥灰灰
 * @version 1.0
 * 微信小程序登录用户信息
 */

@TableName(value = "wechat_user")
@Data
@Accessors(chain = true)
public class WeChatUser {

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    private String openId;

    private String phoneNumber;

    private String token;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    /** 最后一次登录的时间点 */
    private Date lastLogin;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date recordTime;

    /** 是否为补货人员，1：补货，0：不是补货 */
    private Integer isReplenishment;

    public WeChatUser() {
    }

}
